1. Field of Invention
The invention relates to a dead pixel detection method for image, applicable in the image processing of a digital camera, and in particular to a dead pixel real-time detection method for image that can be realized through a dynamically varying threshold value.
2. Related Art
Presently, in the manufacturing process of digital camera, there exists the so-called “dead pixel correction procedure”, namely, proceeding with the detection and correction of the dead pixel for the images taken by the image sensing elements (for example, charged coupled device (CCD) or CMOS) of a digital camera. Thus, the positions of possible dead pixels in an image sensing element is found through a determination logic relating to dead pixel, and is recorded in a storage medium of a digital camera, so that when an image of a picture is taken by a digital camera, the dead pixel in an image can be corrected (or repaired) by other image processing procedures based on the recorded information, thus raising the overall quality of the image.
This kind of prior art is a kind of non real-time detection and correction mechanism of dead pixels, that is mainly utilized to execute a preemptive detection of the inherent defection of an image sensing element that is liable to have dead pixels before the digital camera is shipped out of the factory, so that it may provide an image correction procedure for posterior correction, when the digital camera is used by a user in taking pictures However, this kind of detection tends to spend large amount of manpower and working-hours on the production line of digital camera. In addition, the dead pixel information thus detected and obtained tends to occupy the space of the built-in storage device in a digital camera. This is particularly important for a low-grade digital camera, since any of the storage space is valuable. Also, with the increase and progression of time after the digital camera is shipped out of the factory and put into the market, the image sensing element tends to deteriorate accordingly, so that other new dead pixels may result, thus the dead pixel information originally recorded in the digital camera when it is shipped out of the factory in no longer in conformity with the existing situation at present.
However, in reality, presently, the image processing capability of the digital camera is getting much stronger; therefore, the detection and repair of the dead pixel can be realized in a real-time manner. As disclosed in Taiwan Patent No. I228237, wherein, a method used for real-time dead pixel detection and repair is provided, that is especially related to the detection aspect. In that particular case, in order to save the image processing time and simplify the detection procedure of the dead pixel, a method is disclosed, in which the pixel-to-be-tested and the adjacent pixels on both sides of it (altogether 3 pixels) are chosen as the sample pixels for the determination logic, and that is utilized to achieve the objective of determining if the pixel-to-be-tested is indeed a dead pixel by making use of the correlation operation on the difference of gray level values of the pixel-to-be-tested and the pixels on both sides of it, and a fixed threshold value.
Through the application of this method, though the objective of saving the image processing time and simplifying the detection procedure can be achieved, yet there are deficiencies in the accuracy of determining the dead pixels. Taking it for an example, refer to FIG. 1, wherein, in case that the images along the central vertical direction present a line section of identical color, then in theory, the gray level values of the respective pixels in the central column will be identical as shown in the drawing (all of gray level value 200). In this case, if the method disclosed in Taiwan Patent No. I228237 is utilized, and then the pixel-to-be-tested (of gray level value 200) and the adjacent pixels on both side of it (all of gray level value 50) in the central row are taken as the sample pixels 10. In that situation, the central pixel in this row would be mistakenly judged as a dead pixel according to the determination logic, so that after reparation, its gray level value would be amended to be 50. Nevertheless, at this time, the line section of the identical color in the central vertical direction will indicate a disruption, that is not the results as desired to be achieved by this method. Moreover, the situation shown in FIG. 1B is taken as another example. Likewise, supposing that the pixels in the central row is taken as the sample pixels 10, and further supposing that the central pixel (namely, the pixel-to-be-tested) in the central row is a dead pixel, (and if at this time, the pixel-to-be-tested and the adjacent pixels on both sides of it are pixels of the identical color (the pixels to its left side are all of gray level value 200), thus in this case, if the method disclosed in Taiwan Patent No. I228237 is utilized, the dead pixel in the central row will be missed and neglected and may not be able to be detected at all. Thus, it is impossible to perform the correction and reparation required, and that is not the result desired to be achieved by the method either.
As such, in this respect, the conventional technology is liable to have the problems of misjudgment or missing negligence of the dead pixels. In addition, since fixed threshold value is used to carry out the determination of dead pixels, thus the attribute difference of the image itself can not be taken into consideration effectively to proceed with the detection of the dead pixels. Therefore, on the whole, the dead pixels can not be detected effectively for reparation, and thus the raise of image quality can not be achieved effectively.